package com.bnlr.lrparking.adapter;

import android.graphics.Color;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.bnlr.lrparking.R;
import com.bnlr.lrparking.model.StallListBean;
import com.bnlr.lrparking.widget.SuperTextView;

import java.util.List;

/**
 * @author tian
 * @date 2017/9/16
 */

public class HotStallAdapter extends BaseQuickAdapter<StallListBean.DataBean.DiscountBean, BaseViewHolder> {

    public HotStallAdapter(@Nullable List<StallListBean.DataBean.DiscountBean> data) {
        super(R.layout.item_stalldealdetail, data);
    }

    @Override
    protected void convert(final BaseViewHolder holder, StallListBean.DataBean.DiscountBean item) {
        holder.setIsRecyclable(false);
        SuperTextView delete = holder.getView(R.id.item_stalldealdetia);
        delete.setEnables(false);
        delete.setTextColor(Color.parseColor("#" + item.getTextColor()));
        delete.setBackGround(Color.parseColor("#" + item.getBackColor()));
        delete.setText(item.getTitle());

    }
}
